package com.sup.repository;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

import com.sup.model.ProductionType;
@Repository
public interface ProductionTypeRepository extends JpaRepository<ProductionType,Long>{
	@Query("select P from ProductionType P")
	Page<ProductionType> getProductionTypePage(Pageable pageable);
	
	@Query("select P from ProductionType P where P.productionType=:name")
	public ProductionType findProductionTypeByName(@Param("name")String name);
}
